package com.csx.springcloud.registry.nacos.util;

import org.springframework.cloud.client.ServiceInstance;

/**
 * <p> what does this class do ? </p>
 * <p> How does it work ?</p>
 * <p> Why does it do this ?</p>
 *
 * @author cuisongxu
 * @date 2024/12/23 周一 20:52
 */
public class URLUtil {

    public static String generateURL(ServiceInstance serviceInstance, String URI) {
        String ip = serviceInstance.getHost();
        int port = serviceInstance.getPort();
        return "http://" + ip + ":" + port + URI;
    }
}
